package org.tysite.tyservice.example.jsonview.dto;

import com.fasterxml.jackson.annotation.JsonView;

import java.io.Serializable;

/**
 * 模拟对象列表的对象类型
 * @author tysite
 * @date 2020/4/1 0001
 */
public class JsonViewAttributeDTO implements Serializable {
    private static final long serialVersionUID = 5213719144836974094L;
    
    public interface ListView {}
    
    /** 属性id */
    @JsonView({ListView.class})
    private Integer id;
    /** 属性名称 */
    @JsonView({ListView.class})
    private String name;
    /** 属性类型 */
    @JsonView({ListView.class})
    private String type;
    
    public Integer getId() {
        return id;
    }
    
    public void setId(Integer id) {
        this.id = id;
    }
    
    public String getName() {
        return name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    public String getType() {
        return type;
    }
    
    public void setType(String type) {
        this.type = type;
    }
    
    @Override
    public String toString() {
        return "JsonViewAttributeDTO{" +
            "id=" + id +
            ", name='" + name + '\'' +
            ", type='" + type + '\'' +
            '}';
    }
}
